


public class ListenerFire implements Listener{
	private  double LeavelAram=40.0; 
@Override
public void temperaturechange(Event event) {
	if(event.Gettemperature()>=LeavelAram) {
		System.out.printf("[警报] 温度异常！当前温度：%.1f℃\n",event.Gettemperature());
	}
	
}

public void SetLeavel( double LeavelAram) {
	this.LeavelAram=LeavelAram;
}
}

